home *** CD-ROM | disk | FTP | other *** search
- on goLocationMap
- global gUserObject, gMenuObject
- puppetPalette("MainPal", 60)
- updateStage()
- puppetPalette(0)
- drawQuitButton(gMenuObject)
- predraw(gMenuObject)
- drawUserLevel(gUserObject)
- go("LocMap")
- abort()
- end
-
- on letsGoLogIn buttonObject
- global gUserObject, gLevelObject, gSimObject, gMenuObject, gVTLgameObject, gActorList, gHiddenActorList
- startBuffering()
- clearAllActors()
- if count(the userName of gUserObject) = 0 then
- setDefaultUserName(gUserObject)
- else
- set oldUserGameNum to 0
- repeat with x = 1 to 6
- set oldUserName to getPropAt(the savedGameList of gMenuObject, x)
- if the nameString of gUserObject = oldUserName then
- set the oldUserGameNum of gUserObject to x
- exit repeat
- end if
- end repeat
- if count(the nonEmptyGames of gMenuObject) = 6 then
- if oldUserGameNum <> 0 then
- if the saveEnabled of gMenuObject = 1 then
- set the saveEnabled of gMenuObject to 0
- end if
- end if
- end if
- end if
- set level to getPos(the booleanList of gLevelObject, 1)
- set the level of gLevelObject to level
- updateStage()
- if level > 1 then
- set the locH of sprite 48 to 320
- puppetSprite(48, 1)
- puppetTransition(51, 1)
- go(the frame)
- puppetSprite(48, 0)
- set the gridSize of gSimObject to "Small"
- initSizeVariables(gSimObject)
- newVTLgame(gVTLgameObject)
- end if
- flushBuffer()
- makeButtonJump(buttonObject)
- unpuppetAll()
- drawQuitButton(gMenuObject)
- predraw(gMenuObject)
- drawUserLevel(gUserObject)
- go("LocMap")
- puppetPalette(0)
- abort()
- end
-
- on interruptCounting
- global gHardHatObject
- interruptCountOff(gHardHatObject)
- dontPassEvent()
- end
-
- on quitDialogButtons command
- global gMenuObject, gErrorTrapFlag
- if buttonHandler() then
- if command = "no" then
- startBuffering()
- playSound("RCA-Quit_no")
- set the quitFlag of gMenuObject to 0
- resetBitmap(the quitButObj of gMenuObject)
- set gErrorTrapFlag to 1
- puppetTransition(51, 1)
- go(label("LocMap") + 1)
- showAllActors()
- flushBuffer()
- else
- startBuffering()
- playSound("RCA-Quit_yes")
- clearAllActors()
- unpuppetAll()
- makeButtonJump(the quitButObj of gMenuObject)
- puppetPalette("MainPal")
- go("Grass")
- go(the frame + 1)
- puppetPalette("QuitPal", 60)
- updateStage()
- puppetPalette(0)
- go("Closing")
- flushBuffer()
- abort()
- end if
- end if
- end
-
- on saveDialogButtons command
- global gMenuObject, gLevelObject, gErrorTrapFlag
- if buttonHandler() then
- startBuffering()
- if command = "cancel" then
- set the quitFlag of gMenuObject to 0
- playLevelSound(gLevelObject, the newLevel of gLevelObject)
- set gErrorTrapFlag to 1
- puppetTransition(51, 1)
- go(label("LocMap") + 1)
- showAllActors()
- flushBuffer()
- else
- if command = "yes" then
- playSound("RCA-Quit_yes")
- puppetTransition(51, 1)
- go("DoSave")
- startTimer()
- writeFile(gMenuObject)
- repeat while the timer < 60
- end repeat
- checkForQuit()
- else
- if command = "no" then
- playSound("RCA-Quit_no")
- checkForQuit()
- end if
- end if
- end if
- end if
- end
-
- on checkForQuit
- global gMenuObject, gLevelObject, gUserObject, gErrorTrapFlag
- if the quitFlag of gMenuObject then
- clearAllActors()
- unpuppetAll()
- makeButtonJump(the quitButObj of gMenuObject)
- puppetPalette("MainPal")
- go("Grass")
- go(the frame + 1)
- puppetPalette("QuitPal", 60)
- updateStage()
- puppetPalette(0)
- go("Closing")
- flushBuffer()
- abort()
- else
- go("Promotion")
- go(the frame + 1)
- startTimer()
- goToNewLevel(gLevelObject)
- repeat while the timer < 60
- end repeat
- drawUserLevel(gUserObject)
- playLevelSound(gLevelObject, the newLevel of gLevelObject)
- set gErrorTrapFlag to 1
- puppetTransition(51, 1)
- go(label("LocMap") + 1)
- showAllActors()
- flushBuffer()
- end if
- end
-
- on keepSandboxBut sandboxChan
- puppetSprite(48, 1)
- set the locH of sprite 48 to the locH of sprite sandboxChan
- set the locV of sprite 48 to the locV of sprite sandboxChan
- set the castNum of sprite 48 to the castNum of sprite sandboxChan
- set the ink of sprite 48 to 8
- end
-
- on stopHelpSound
- global gHelpObject
- stopSound(gHelpObject)
- end
-